Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Getting Information About Compressed Data


GetCompressedImageSize

The GetCompressedImageSize function determines the size, in bytes, of a compressed image.

Most applications do not need to use this function because compressed images have a corresponding image description structure with a size field. You only need to use this function if you do not have an image description structure associated with your data--for example, when you are taking a compressed image out of a movie one frame at a time.

pascal OSErr GetCompressedImageSize (ImageDescriptionHandle desc,
                                    Ptr data, long bufferSize,
                                    DataProcRecordPtr dataProc,
                                    long *dataSize);
desc
Specifies a handle to the image description structure that defines the compressed image for the operation.
data
Points to the compressed image data. This pointer must contain a 32-bit clean address.
bufferSize
Specifies the size of the buffer to be used by the data-loading
function specified by the dataProc parameter. If you have not specified a data-loading function, set this parameter to 0.
dataProc
Points to a data-loading function structure. If the data stream is not all in memory when your program calls GetCompressedImageSize, the compressor calls a function you provide that loads more compressed data (see "Data-Loading Functions" beginning on page 3-153 for more information about data-loading functions). If you have not provided a data-loading function, set this parameter to nil. In this case, the entire image must be in memory at the location specified by the data parameter.
dataSize
Contains a pointer to a field that is to receive the size, in bytes, of the compressed image.
DESCRIPTION
Your application may use the GetCompressedImageSize function when parsing a data stream that does not contain an image description structure for each frame in the sequence.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
noCodecErr-8961Image Compression Manager could not find the specified compressor
codecSpoolErr-8966Error loading or unloading data
Component Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996